import type { ProColumns } from '@ant-design/pro-table';

export type columnsDataType = {
  order: number;
  acName: string;
  custNo: string;
  acNo: string;
  balance: string;
  custType: string;
  openAcDate: string;
  status: string;
  startTime: string;
  endTime: string;
};

const columnsData: ProColumns<columnsDataType>[] = [
  // 配置搜索框
  {
    title: '客户编号',
    dataIndex: 'serialNo',
    hideInTable: true,
    fieldProps: {
      maxLength: 20,
    },
  },
  {
    title: '客户昵称',
    dataIndex: 'nickname',
    hideInTable: true,
    fieldProps: {
      maxLength: 20,
    },
  },
  {
    title: '用户名',
    dataIndex: 'username',
    hideInTable: true,
    fieldProps: {
      maxLength: 20,
    },
  },
  {
    title: '身份证号',
    dataIndex: 'idNumber',
    hideInTable: true,
    fieldProps: {
      maxLength: 20,
    },
  },

  // table里面的内容
  {
    title: '客户编号',
    dataIndex: 'serialNo',
    hideInSearch: true,
    width: 120,
    fixed: 'left',
  },
  {
    title: '客户名',
    width: 120,
    dataIndex: 'username',
    hideInSearch: true,
    fixed: 'left',
  },
  {
    title: '昵称',
    width: 160,
    dataIndex: 'nickname',
    hideInSearch: true,
  },
  {
    title: '账号状态',
    width: 100,
    hideInSearch: true,
    dataIndex: 'status',
    valueType: 'select',
    valueEnum: {
      0: {
        text: '个人客户',
      },
      1: {
        text: '企业客户',
      },
    },
  },
  {
    title: '身份证号',
    width: 160,
    dataIndex: 'idNumber',
    hideInSearch: true,
  },
  {
    title: '电话号码',
    width: 120,
    dataIndex: 'phone',
    hideInSearch: true,
  },
  {
    title: '邮箱',
    width: 120,
    dataIndex: 'email',
    hideInSearch: true,
  },
  {
    title: '创建时间',
    width: 160,
    dataIndex: 'createTime',
    hideInSearch: true,
    valueType: 'dateTime',
  },
  {
    title: '修改时间',
    width: 160,
    dataIndex: 'updateTime',
    hideInSearch: true,
    valueType: 'dateTime',
  },
  {
    title: '支付状态',
    width: 100,
    hideInSearch: true,
    dataIndex: 'status',
    valueType: 'select',
    valueEnum: {
      0: {
        text: '正常',
        status: 'Success',
      },
      1: {
        text: '未设置',
        status: 'Default',
      },
      2: {
        text: '锁定',
        status: 'Error',
      },
    },
  },
  {
    title: '操作',
    width: 160,
    hideInSearch: true,
    dataIndex: 'action',
    fixed: 'right',
  },
];

export default columnsData;
